
import org.mozilla.javascript.ScriptableObject;

/**
 * ActiveX emulator class
 *
 * @author Chengyu Song
 *
 *
 */

public class HoneyActiveX extends ScriptableObject{
    
    /** ObjectName */
    private String fObjectName;

    public HoneyActiveX() {
        
    }

    public HoneyActiveX(String ObjectName) {
        System.out.println("new Object:" + ObjectName);

        fObjectName = ObjectName;
    }

    @Override
    public String getClassName() {
        return "ActiveXObject";
    }

    public void jsConstructor(String ObjectName) {
        System.out.println("New Object:" + ObjectName);

        fObjectName = ObjectName;
    }

    public void jsFunction___noSuchMethod__(String id, Object args) {
        System.out.println("No such method:" + id);
    }

    public HoneyActiveX jsFunction_CreateObject(String ObjectName) {
        return new HoneyActiveX(ObjectName);
    }
}